package com.ztgf.commodity.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.commodity.models.bo.AttributesQueryBO;
import com.ztgf.commodity.models.dto.CommodityParamDTO;
import com.ztgf.commodity.models.vo.CommodityParamVO;
import com.ztgf.commodity.models.vo.CommodityParamValueVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品参数信息表映射
 *
 * @author chenyu.wang
 * @Date 2020-06-15 10:12:31
 */
@Mapper
public interface CommodityParamMapper extends BaseMapper<CommodityParamDTO> {

    /**
     * description: 查询参数值
     * param: [paramId]
     * author: chenyu.wang
     * date: 2020-07-09
     * return: java.util.List<com.ztgf.commodity.models.vo.CommodityParamValueVO>
     */
    List<CommodityParamValueVO> getByParamId(@Param("paramId") Long paramId);

    /**
     * description: 根据id查询参数详情
     * param: [id]
     * author: chenyu.wang
     * date: 2020-07-09
     * return: com.ztgf.commodity.models.vo.CommodityParamVO
     */
    CommodityParamVO getById(@Param("id") Long id);

    /**
     * description: 查询商品参数信息列表
     * param: [page]
     * author: chenyu.wang
     * date: 2020-07-09
     * return: java.util.List<com.ztgf.commodity.models.vo.CommodityParamVO>
     */
    List<CommodityParamVO> queryPageList(Page<CommodityParamVO> page, @Param(value = "item") AttributesQueryBO bo);
}
